package com.lx.service;

import com.lx.entity.User;

import org.springframework.data.domain.Page;

import java.util.List;

/**
 * user服务类
 * @author 段誉
 */
public interface UserService {
  /**
   * 查询所有用户
   * @param
   * @return java.lang.Object
   * @author 段誉
   * @date 2019/5/15 15:14
   * @throws
   * @since 1.0.0
   */
  List<User> getAll();

  /**
   * 添加用户
   * @param user
   * @return boolean
   * @author 段誉
   * @date 2019/5/15 17:07
   * @throws
   * @since 1.0.0
   */
  void add(User user);

  /**
   * 根据名字进行模糊查询
   * @param name
   * @return java.util.List<com.lx.entity.User>
   * @author 段誉
   * @date 2019/5/20 14:16
   * @throws
   * @since 1.0.0
   */
  List<User> getListByName(String name);

  /**
   * 分页查询
   * @param name
  	 * @param pageNum
  	 * @param pageSize
   * @return org.springframework.data.domain.Page<com.lx.entity.User>
   * @author 段誉
   * @date 2019/5/20 15:20
   * @throws
   * @since 1.0.0
   */
  Page<User> getListPageByName(String name, Integer pageNum, Integer pageSize);

  /**
   * 根据用户名查询用户
   * @param username
   * @return com.lx.entity.User
   * @author 段誉
   * @date 2019/5/21 9:37
   * @throws
   * @since 1.0.0
   */
  User getUserInfoByUsername(String username);
}
